package com.springboot_shopping.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("t_user")
public class User {

    @TableId(value = "u_id", type = IdType.AUTO)
    private Integer userId;

    @TableField("u_name")
    private String userName;

    @TableField("u_password")
    private String password;

    @TableField("u_email")
    private String email;

    @TableField("u_phone")
    private String phone;

    @TableField("u_register_time")
    private Date registerTime;

    @TableField("u_type")
    private Integer uType;//2：会员 3：普通用户

    // 关联地址列表
    @TableField(exist = false)
    private List<UserAddress> addresses;




}